package top.starmc.starpet.listener

import ink.ptms.um.event.MobDeathEvent
import org.bukkit.entity.Player
import taboolib.common.platform.event.SubscribeEvent
import top.starmc.starpet.util.getPlayerData

object Entities {
    @SubscribeEvent
    fun onMobDeath(event: MobDeathEvent) {
        if (event.killer is Player) {
            with((event.killer as Player).getPlayerData()) {
                if (internal != null) {
                    addExp(event.mob.config.getInt("PetExp"))
                }
            }
        }
    }
}